package com.lvy.hczn.front.common.constant;

import lombok.Data;

public enum EnumTopic {
    TOPICSYNCSPU("topicSyncSpu"),
    TOPICSYNCCATEGORY("topicSyncCategory"),
    TEMPER_AREA_CONFIG("TEMPER_AREA_CONFIG"),
    TOPIC_DICT("TOPIC_DICT");

    private String topic;

    EnumTopic(String topic) {
        this.topic = topic;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public static EnumTopic getEnumTopicByTopic(String topic) {
        for (EnumTopic enumTopic : EnumTopic.values()) {
            if (enumTopic.getTopic().equals(topic)) {
                return enumTopic;
            }
        }
        return null;
    }
}
